package com.jie.service.Impl;

import com.jie.mapper.ScheduleMapper;
import com.jie.pojo.Schedule;
import com.jie.pojo.Student;
import com.jie.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScheduleServiceImpl implements ScheduleService {

    @Autowired
    private ScheduleMapper scheduleMapper;

    public List<Schedule> findAllClass(String teacherid) throws Exception {
        List<Schedule> scheduleList = scheduleMapper.findAllClass(teacherid);
        return scheduleList;
    }

    public Boolean insertClass(Schedule schedule) throws Exception {
        Boolean IsSuccess = scheduleMapper.insertClass(schedule);
        return IsSuccess;
    }

    public Boolean insertStudent(Student student) throws Exception {
        Boolean IsSuccess = scheduleMapper.insertStudent(student);
        return IsSuccess;
    }
}
